abstract class Dad{
abstract void doSomething();
}
class AnonymousInnerClassDemo{
public static void main(String[] args){
Dad dad = new Dad(){
void doSomething(){
System.out.println("dad is doing something");
}
};
dad.doSomething();
}
}

interface Runnable{
void run();
}
 class AnonymousinnerClassUsingInterfaceDemo{
public static void main(String[] args)
{
Runnable runObj = new Runnable(){
public void run(){
System.out.println("Run lola Run");
}
};
runObj.run();
}
}
 class LocalInnerClassDemo{
private int count = 11;
void display(){
class LocalInnerClass{
void whatIsThecount(){
System.out.println(count);
}
}
LocalInnerClass licObj = new LocalInnerClass();
licObj.whatIsThecount();
}
public static void main(String[] felight){
new LocalInnerClassDemo().display();
}
}
class Home
{
static String tvInHall = "Tv in Hall";
static class Room{
String tvInRoom = "Tv in Room";
void watchTV(){
System.out.println("I can watch"+tvInRoom+"&" + tvInHall);
}
}
}
class StaticNestedClassDemo{
public static void main(String[] args){
Home.Room bedRoom = new Home.Room();
bedRoom.watchTV();
}
}